var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName  = navigator.appName;
var fullVersion  = ''+parseFloat(navigator.appVersion); 
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;
var woff = ("<style>@font-face {font-family: 'Typeface-Style'; src: local('Typeface Style'), local('typeface-style'), url('typeface-style.woff') format('woff'); } .birra-stout {font-family: birra-stout;}</style>")
var eot = ("<style>@font-face {font-family: 'Typeface-Style'; src: url('typeface-style.eot'); } .typeface-style {font-family: typeface-style;}</style>")
var svg = ("<style>@font-face {font-family: 'Typeface-Style'; src: local('Typeface Style'), local('typeface-style'), url('typeface-style.svg#Typeface-Style') format('svg'); } .typeface-style {font-family: typeface-style;}</style>")
var cufon = ("<script src='cufon.js' type='text/javascript'></script><script src='typeface-style.font.js' type='text/javascript'></script><script type='text/javascript'>Cufon.replace('.typeface-style', { fontFamily: 'typeface-style' });</script>")

if (screen.width <= 700) {
document.write(cufon);
}

// In MSIE, the true version is after "MSIE" in userAgent
if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
	document.write(eot);
}
// In Chrome, the true version is after "Chrome" 
else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
document.write(svg);
}
// In Safari, the true version is after "Safari" 
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
	if ((fullVersion = nAgt.substring(verOffset+7)>=259.67)) {
		document.write(svg);
	}
	else {
		document.write(cufon);
	}
}
// In Firefox, the true version is after "Firefox" 
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
	if ((fullVersion = nAgt.substring(verOffset+8))>=("3.6")) {
		document.write(woff);
	}
	else {
		document.write(cufon);
	}
}
// Opera 
else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
	document.write(svg);
}
// Other browsers get cufon 
else {
	document.write(cufon);
}

// trim the fullVersion string at semicolon/space if present
if ((ix=fullVersion.indexOf(";"))!=-1) fullVersion=fullVersion.substring(0,ix);
if ((ix=fullVersion.indexOf(" "))!=-1) fullVersion=fullVersion.substring(0,ix);

majorVersion = parseInt(''+fullVersion,10);
if (isNaN(majorVersion)) {
 fullVersion  = ''+parseFloat(navigator.appVersion); 
 majorVersion = parseInt(navigator.appVersion,10);
}